package com.example.demo4_sport.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 用户实体
 */

@Data
/**
 * 空构造函数用于自动完成初始化  Spring自动装填
 */
@NoArgsConstructor
@ToString
public class User {

    /**
     * 用户名
     * 密码
     * 邮箱
     * 角色
     * 状态
     */

    private Integer id;
    private String username;
    private String password;
    private String email;
    private String role;
    private boolean state;

    /**
     * id 数据库自增，没有必要写在这里
     * @param username
     * @param password
     * @param email
     * @param role
     * @param state
     */
    public User(String username, String password, String email, String role, boolean state) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.role = role;
        this.state = state;
    }
}
